package com.weishaoying.example.base.taskexecutor;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author WeiShaoying
 * @date 2018/4/4
 */
public class Main {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);
        MailService mailService = context.getBean(MailService.class);
        for (int i = 0; i < 10; i++) {
            mailService.sendMail(i);
            mailService.sendPictureMail(i);
        }
        context.close();
    }
}
